﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;


namespace CooWork.Models
{
    public class Account
    {
        [Required(ErrorMessage ="{0} 是必填项")]
        [Display(Name = "用户名")]
        public string UserName { get; set; }


        [Required(ErrorMessage = "{0} 是必填项")]
        [Display(Name = "姓名")]
        public string ActualName { get; set; }


        [Required(ErrorMessage = "{0} 是必填项")]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "电子邮件")]
        public string Email { get; set; }


        [Required(ErrorMessage = "{0} 是必填项")]
        [Display(Name = "部门")]
        public int DepartmentId { get; set; }


        [Required(ErrorMessage = "{0} 是必填项")]
        [Display(Name = "角色")]
        public string Role { get; set; }


        
        [StringLength(100, ErrorMessage = " {0} 至少 {2} 位长.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password { get; set; }

    }
}